#include <buola/mat.h>
#include <buola/mat/prettyprint.h>
#include <buola/mat/svd.h>
#include <buola/mat/traits_typename.h>

using namespace buola;

int main(int /*argc*/,char** argv)
{
    mat::CMat_d a=mat::random(2000,2000,std::uniform_real_distribution<double>(0,1));

    start_timer();
    mat::CMat_d b=cumsum(a);
    end_timer();
    msg_info() << sum(b) << "\n";

    start_timer();
    b=cumsum(rows(a));
    end_timer();
    msg_info() << sum(b) << "\n";

    start_timer();
    b=cumsum(cols(a));
    end_timer();
    msg_info() << sum(b) << "\n";

    start_timer();
    b=cumsum(rows(cumsum(cols(a))));
    end_timer();
    msg_info() << sum(b) << "\n";

    start_timer();
    double c=mean(a);
    end_timer();
    

    
    msg_info() << c << " " << b(1999,1999) << "\n";
}
